package com.astronomy.recruit.mapper;

import com.astronomy.recruit.pojo.Recruit;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface RecruitMapper extends Mapper<Recruit> {

    @Select("SELECT a.* FROM tb_recruit a WHERE a.state=#{state} ORDER BY a.createtime DESC LIMIT 6")
    List<Recruit> queryByStateOrderByCreatetimeDesc(String state);
    @Select("SELECT a.* FROM tb_recruit a WHERE a.state !=#{state} ORDER BY a.createtime DESC LIMIT 6")
    List<Recruit> queryByStateNotOrderByCreatetimeDesc(String state);
}
